#ifndef __PREGENE_HASH_HEADER__
#define __PREGENE_HASH_HEADER__

#pragma once

#include <stdlib.h>

/************************************************************************/
/* Hash Table                                                           */
/************************************************************************/

typedef enum HASH_TYPE
{
	HASH_TYPE_UNKNOWN	= 0x0000,
	HASH_TYPE_NUMERIC	= 0x0001,
	HASH_TYPE_STRING	= 0x0002,
	HASH_TYPE_BINARY	= 0x0004,
	HASH_TYPE_MD5		= 0x0010,
	HASH_TYPE_BASE64	= 0x0020,
	HASH_TYPE_POINTER	= 0x0040,
};

typedef enum HASH_PROP
{
	HASH_PROP_USED	= 0,
	HASH_PROP_TYPE,
	HASH_PROP_NB,
};

typedef struct HASH_ENTRY_PROP
{
	UINT32			val[HASH_PROP_NB];
} HASH_ENTRY_PROP;

typedef struct HASH_INDEX_ENTRY
{
	UINT32			hash_val;
	UINT32			name_len;
	void*			name;
	void*			addr;
	HASH_ENTRY_PROP	prop;
} HASH_INDEX_ENTRY;

class gene_hash
{
public: // constructor & desctructor
	gene_hash();
	~gene_hash();

public: // variables

public: // interfaces
	void*		get_item	(int hash_type, void* name);
	void*		update_item	(int hash_type, void* name, int prop_type, void* prop_val);
	void*		delete_item	(int hash_type, void* name);
	UINT32		get_item_count();
	UINT32		get_buffer_length();
	UINT32		get_free_count();

protected: // variables


};

#endif // __PREGENE_HASH_HEADER__